package com.xmotor.test_Autowired_List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description
 * @Author Dang Xianyue
 * @Date 2020-09-21 10:46
 * @Version 1.0
 */
@RestController
@RequestMapping("/test_Autowired_List")
public class TestAutowiredListController {

    @Autowired
    private List<TestInterFace> list;

    @RequestMapping("/test1")
    public void test1() throws Exception{
        for (TestInterFace testInterFace : list) {
            System.out.println(testInterFace.say());
        }
    }
}
